package org.bees.cms.web.util.velocity.editer;

import java.io.Serializable;

import net.sf.json.JSONObject;

public abstract class AbstractClauseEditer extends AbstractEditer {
	protected String table;

	@Override
	public void initialize(JSONObject json) throws Exception {
		super.initialize(json);
		table = json == null ? table : json.containsKey("table") ? json.getString("table") : table;
	}

	@Override
	public String edit(Serializable t) throws Exception {
		return super.edit(t);
	}

	@Override
	public void destroy() throws Exception {
		super.destroy();
		table = null;
	}

	public String getTable() {
		return table;
	}

	public void setTable(String table) {
		this.table = table;
	}

}
